set String Name of the set to which to add the record
ADD TO SET adds the current record of file to set. The set must already exist; if it does not, an error occurs. If a current record does not exist for file, ADD TO SET has no effect.
The example below deletes duplicate records from a file. The file contains information about people. A  For loop moves through all the records, comparing the current record to the previous record. If the first name and the last name are the same, then the record is added to a set. At the end of the loop, the set is made the current selection and the current selection is deleted:
CREATE EMPTY SET ([People]; "Duplicates")
` Create an empty set for duplicate records
ALL RECORDS ([People]) ` Select all records Sort the records by